package com.linwen.javase.desgin_pattern.BigTalkDesignPattenJAVACode._0._4抽象类与接口;

/**
 * @ClassName Test0_4
 * @Description TODO
 * @Author zero
 * @DATE 2023/7/9 7:44 PM
 * @Version 1.0
 */
public class Test0_4 {
    public static void main(String[] args) {
        MachineCat mcat = new MachineCat("叮噹猫");
        XiaoTianDog xiaotian = new XiaoTianDog("啸天犬");
        IChange[] array = new IChange[2];
        array[0] = mcat;
        array[1] = xiaotian;
        System.out.println(array[0].changeThing("各种各样的东西！"));
        System.out.println();
        System.out.println(array[1].changeThing("各种各样的东西！"));
    }
}
